<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/auth/templates/template.xhtml">
	<ui:define name="pageTitle">Extrato Conta Cliente</ui:define>
	<ui:define name="body">
		<f:view>

			<f:metadata>
				<f:viewParam name="cliente" value="#{clienteRSBean.cliente}" />
			</f:metadata>

			<p:growl id="messages" showDetail="true" autoUpdate="true"
				closable="true" />

			<h:form>
				<h:panelGrid cellspacing="10px" styleClass="center">
					<f:facet name="header">Extrato Conta Cliente</f:facet>
					<h:outputLabel value="Dados do Cliente" styleClass="header3" />
					<h:panelGrid columns="2" cellspacing="10px">
						<h:outputLabel value="Nome:" />
						<h:outputLabel value="#{clienteRSBean.cliente.nome}" />
						<h:outputLabel value="Limite:" />
						<h:outputLabel value="#{clienteRSBean.cliente.limite}">
							<f:convertNumber currencyCode="BRL" type="currency" />
						</h:outputLabel>
						<h:outputLabel value="Saldo Atual:" />
						<h:outputLabel value="#{clienteRSBean.saldoAtual}">
							<f:convertNumber currencyCode="BRL" type="currency" />
						</h:outputLabel>
					</h:panelGrid>
					<p:dataTable var="operacao"
						value="#{clienteRSBean.operacoesContaCliente}" paginator="true"
						rows="10"
						paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
						rowsPerPageTemplate="5,10,15">
						<p:column headerText="Data">
							<h:outputText value="#{operacao.data.time}">
								<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
							</h:outputText>
						</p:column>
						<p:column headerText="Histórico">
							<h:outputText value="#{operacao.historico}" />
						</p:column>
						<p:column headerText="Valor">
							<h:outputText value="#{operacao.valor}">
								<f:convertNumber currencyCode="BRL" type="currency" />
							</h:outputText>
						</p:column>
					</p:dataTable>
				</h:panelGrid>
			</h:form>
		</f:view>
	</ui:define>
</ui:composition>

</html>